package edison.jcr.nodetype;

import javax.jcr.nodetype.NodeType;
import javax.jcr.nodetype.NodeTypeIterator;
import javax.persistence.TypedQuery;

import edison.jcr.RangeIteratorImpl;
import edison.jcr.SessionContext;
import edison.persistence.NodeTypeBean;

public final class NodeTypeIteratorImpl extends RangeIteratorImpl<NodeTypeBean> implements NodeTypeIterator {

	public NodeTypeIteratorImpl(SessionContext context, TypedQuery<NodeTypeBean> query, TypedQuery<Long> sizeQuery) {
		super(context, query, sizeQuery);
	}

	public NodeType nextNodeType() {
		return (NodeType) next();
	}

	@Override
	protected Object cast(NodeTypeBean bean) {
		return new NodeTypeImpl(context, bean);
	}
}